package Exam;

import java.sql.*;


public class ConnectionUtil {
	public static Connection getConnection() throws SQLException,ClassNotFoundException{
		Class.forName("com.mysql.jdbc.Driver");
		Connection con=DriverManager.getConnection("jdbc:mysql://localhost/student?Unicode=true&characterEncoding=UTF-8","root","root");
		  return con;
			}
				public static void closeConnection(Connection conn)throws SQLException {
					if (conn !=null) {
						conn.close();
					
					}
				}
}


